<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>v-if Test</title>
    <script src="https://cdn.bootcss.com/vue/2.2.2/vue.min.js"></script>
</head>
<body>
    <div id='app'>
        <p v-if='seen'>单元素测试</p>
        <template v-if='cansee'>
            <p>多元素测试</p>
            <h2>嵌套元素测试</h2>
        </template>
    </div>
    <script>
        new Vue({
            el : '#app',
            data : {
                seen : true,
                cansee : false
            }
        })
    </script>
</body>
</html>